﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShoppingEntity
{
    public class ReturnExchange : BaseDeleteEntity
    {
        /// <summary>
        /// 订单Id
        /// </summary>
        [Column(TypeName = "varchar(36)")]
        public string OrderId { get; set; }
        /// <summary>
        /// 商品ID
        /// </summary>
        [Column(TypeName = "varchar(36)")]
        public string GoodsId { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [Column(TypeName = "varchar(36)")]
        public string UserId { get; set; }

        /// <summary>
        /// 退货原因
        /// </summary>
        [Column(TypeName = "varchar(125)")]
        public string Reason { get; set; }

        /// <summary>
        /// 退货图片
        /// </summary>
        [Column(TypeName = "varchar(Max)")]
        public string Commodityimg { get; set; }


        /// <summary>
        /// 状态: 1、审批中 2、结束 3、作废
        /// </summary>
        [Required]
        public ReturnExchangeStatusEnum State { get; set; }

        /// <summary>
        /// 处理时间
        /// </summary>
        public DateTime HandleTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }
    /// <summary>
    /// 状态的枚举
    /// </summary>
    public enum ReturnExchangeStatusEnum
    {
        待商家审批 = 1,
        同意退款 = 2,  
        货物运回中 = 3,
        退款完成 = 4,
    }

}

